package com.csdj.controller;


import com.csdj.service.ICategoryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zq
 * @since 2024-12-11
 */
@RestController
@RequestMapping("/category")
@CrossOrigin
public class CategoryController {

    @Resource
    private ICategoryService service;

    @GetMapping("getAllcategory")
    public Object getAllcategory(){
        return service.list();
    }
}
